package com.javasm.mb_store_api_final.giftsandgoods.goods.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.javasm.mb_store_api_final.giftsandgoods.goods.entity.GgGoods;
import com.javasm.mb_store_api_final.sys_control.usercontrol.sys_user.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品管理-商品管理(GgGoods)表数据库访问层
 *
 * @author makejava
 * @since 2024-07-29 21:20:18
 */
@Mapper
public interface GgGoodsDao extends BaseMapper<GgGoods> {


    @Select("SELECT g.* " +
            "FROM gg_goods g " +
            "JOIN order_goods og ON g.id = og.gid " +
            "WHERE og.oid = #{oid}")
    List<GgGoods> getByOrder(Integer oid);
}

